package com.nepu.spark.realtime.util

import java.util.ResourceBundle

import com.nepu.spark.realtime.constant.RedisConstant

/**
  * 本类用于解析properties文件中的数据
  *
  * @author chenshuaijun
  * @create 2022-10-29 19:07
  */
object MyConfPropertiesUtils {

  private val bundle: ResourceBundle = ResourceBundle.getBundle("conf")

  def apply(confName: String): String = {
    val value: String = bundle.getString(confName)
    value
  }

  def main(args: Array[String]): Unit = {
    println(MyConfPropertiesUtils(RedisConstant.REDIS_HOST))
    println(MyConfPropertiesUtils(RedisConstant.REDIS_PORT))
  }
}
